{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "print的字符串通常会很长，无法放在一行中。这个时候单独写成一个变量更好。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "error_log_message = (\n",
    "    \"Error: {error_message}\\n\"\n",
    "    f\"File: {file_path}\\n\"\n",
    "    f\"Line: {line_number}\\n\"\n",
    ")\n",
    "# 注意：在括号内，字符串文字（使用引号）会自动相加，我们不需要使用 + 运算符来执行此操作"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
